Release 10.1A: OpenEdge Development:
Programming Interfaces
Directing output to multiple destinations
Progress lets you specify multiple output destinations in a single procedure. You can use
OUTPUT TOseveral times in a single procedure to direct the output to different destinations. You can also define named streams so you can output to several destinations.First, you use the
DEFINE STREAMstatement to create the streams you need. This is a partial syntax forDEFINE STREAM:
To output to the stream, you reference it in your output statement with the keyword
STREAM, as shown in the following example:
The notes below describe how the code works:
- When the procedure starts, it has a default unnamed stream that outputs to the screen by default. This statement establishes a second stream that also outputs to the screen by default. Both streams are now available for the life of the procedure.
- This
OUTPUT TOstatement redirects the unnamed stream to the default printer.- This
OUTPUT TOstatement redirects the named stream to output to a file.- The first
DISPLAYstatement outputs to the unnamed stream only.- The second
DISPLAYstatement outputs to the named stream only.- This
OUTPUT CLOSEstatement redirects the default stream back to the screen.- This
OUTPUTCLOSEstatement redirects the named stream back to the screen.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |